"""LightPort配置文件"""

# 扫描配置
SCAN_CONFIG = {
    'default_timeout': 3,
    'max_threads': 100,
    'max_retries': 3,
    'retry_delay': 1,
}

# 防火墙绕过配置
BYPASS_CONFIG = {
    'enabled': True,
    'max_attempts': 5,
    'techniques': [
        'fragmentation',
        'slow_scan',
        'encoding',
        'source_port_manipulation',
        'ttl_manipulation'
    ],
    'slow_scan_delay': (5, 10),  # 最小和最大延迟
}

# 服务检测配置
SERVICE_CONFIG = {
    'banner_timeout': 5,
    'max_banner_size': 4096,
    'common_ports': [21, 22, 23, 25, 53, 80, 110, 143, 443, 993, 995, 3306, 5432, 6379, 27017, 8080, 8443],
    'ssl_ports': [443, 993, 995, 8443],
}

# 输出配置
OUTPUT_CONFIG = {
    'colors': {
        'open': 'green',
        'closed': 'red',
        'filtered': 'yellow',
        'error': 'red',
        'info': 'cyan',
        'warning': 'yellow',
    },
    'formats': ['json', 'csv', 'xml'],
}

# 日志配置
LOGGING_CONFIG = {
    'level': 'INFO',
    'format': '%(asctime)s - %(name)s - %(levelname)s - %(message)s',
    'file': 'logs/lightport.log',
    'max_size': '10MB',
    'backup_count': 5,
}

# 网络配置
NETWORK_CONFIG = {
    'source_port_range': (1024, 65535),
    'ttl_values': [32, 64, 128, 255],
    'fragment_size': 8,
    'window_size': 8192,
}

# 用户代理列表（用于HTTP检测）
USER_AGENTS = [
    'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
    'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36',
    'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36',
    'LightPort/1.0 (Security Scanner)',
]
